/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.test.app.service;
import com.test.app.form.Contact;
import com.test.app.dao.ContactDaoImpl;
import com.test.app.email.Email;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author darshana
 */
@Service
public class ContactService {

    @Autowired
    private ContactDaoImpl contactDaoImpl;

    @Autowired
    private Email email;

    @Transactional
    public void addContact(Contact contact){
        contactDaoImpl.addContact(contact);
    }

    @Transactional
    public List<Contact> list(){
        return contactDaoImpl.list();
    }

    @Transactional
    public void remove(Integer id){
        contactDaoImpl.remove(id);
    }

}
